﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;



namespace Hanhud.Win.Pages
{
    public partial class frmPagesEdit : Form
    {
        public Page Page;
        public frmPagesEdit(Page page)
        {
            InitializeComponent();

            Page = page;
        }

        private void frmPagesEdit_Load(object sender, EventArgs e)
        {
            if (Page.Module != "")
            {
                txtModule.ReadOnly = true;
                txtName.ReadOnly = true;

                txtModule.Text = Page.Module;
                txtName.Text = Page.Name;

                txtTitle.Text = Page.Title;
                txtDescription.Text = Page.Description;
                txtKeywords.Text = Page.Keywords;
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            Page.Title = txtTitle.Text;
            Page.Description = txtDescription.Text;
            Page.Keywords = txtKeywords.Text;

            DialogResult = System.Windows.Forms.DialogResult.OK;


        }
    }
}
